{extend name="public/base" /}
{block name="body"}
<div class="layui-fluid">
    <div class="layui-row">
        <div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
			<div class="widget-head">
				<div class="widget-title a m-cf">物流公司</div>
			</div>
			<div class="widget-body layui-col-sm12 layui-col-md12 layui-col-lg12">
				<!-- 工具栏 -->
				<div class="page_toolbar">
					<div class="layui-btn-group">
						<a class="layui-btn" href="{:url('Express/add')}"><i class="menu-icon fa fa-plus"></i> 新增</a>
						<a href="{:url('Express/del')}" class="layui-btn ajax-batch"><i class="fa fa-trash-o"></i> 删除</a>
					</div>
				</div>
				<div class="layui-col-md12" >
					<table width="100%" class="layui-table layui-form">
						<thead>
							<tr>
								<th width="30"><input type="checkbox" lay-skin="primary" lay-filter="*"></th>
								<th>公司名称</th>
								<th>编号</th>
								<th>联系电话</th>
								<th>是否默认</th>
								<th>状态</th>
								<th>操作</th>
							</tr>
						</thead>
						<tbody>
							{volist name="list" id="vo"}
							<tr>
								<td><input type="checkbox" name="id" value="{$vo.id}" lay-skin="primary"></td>
								<td>{$vo.name}</td>
								<td>{$vo.code}</td>
								<td>{$vo.phone}</td>
								<td>
									<input type="checkbox" name="is_default" lay-skin="switch" lay-filter="*" lay-text="是|否" data-url="{:url('Express/update?id='.$vo['id'])}" {if $vo.status eq 1}checked="checked"{/if}>                
								</td>
								<td>
									<input type="checkbox" name="status" lay-skin="switch" lay-filter="*" lay-text="是|否" data-url="{:url('Express/update?id='.$vo['id'])}" {if $vo.status eq 1}checked="checked"{/if}>                
								</td>
								<td>
									<a href="{:url('Express/edit?id='.$vo['id'])}" class="layui-btn layui-btn-xs layui-btn-normal"><i class="fa fa-edit"></i> 编辑</a>
									<a href="{:url('Express/del?id='.$vo['id'])}" class="layui-btn layui-btn-xs layui-btn-danger ajax-delete"><i class="fa fa-trash-o"></i> 删除</a>				
								</td>
							</tr>
							{/volist}
						</tbody>
					</table>
					<div class="layui-col-md12 layui-col-xs12">
						<div class="page">{$list->render()|raw}</div>
					</div>
				</div>
			</div>
        </div>
    </div>
</div>
{/block}